Licenses, build info, and fixed METIS on Windows#220
Merged
Bruno02468 merged 4 commits intoMystranSolver:devfrom Apr 29, 2026
Merged
Licenses, build info, and fixed METIS on Windows#220Bruno02468 merged 4 commits intoMystranSolver:devfrom
Bruno02468 merged 4 commits intoMystranSolver:devfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains two new features and fixes METIS builds on Windows.
The two new features are:
mystran --versionnow prints information about the MYSTRAN build: compiler flags, build type, timestamp, embedded libraries, etcetera.mystran --licensesnow prints MYSTRAN's license, followed by the licenses of every library embedded into the binary.Since all that information depends on the build environment, it cannot be determined until CMake runs. Therefore,
CMakeLists.txtnow contains code to keep track of all libraries are being statically linked into MYSTRAN (plus LAPACK, which is built from source and linked as object code -- still embedded into the binary).The motivation for
--licensesis compliance with open-source licenses, which require distribution of copyright notices in both source and binary form. We were covered for source form, since licenses would be present on the submodules and, in the case of system-provided libraries, we added them to anextra_licensesdirectory. But for binary form, we had to embed them and--licensesworks.As for
--version, well, since I was already working on generating build information for runtime display, I decided to make something that'd help me. More than once I wasted time because some Fortran flag was being silently overridden, or because I lost track of what build type I was running. So--versiontakes care of that!Oh, and METIS for Windows was breaking because of some weird stuff with GKlib's build script. I fixed include directories, linked against the embedded implementation of
<regex.h>, and forced C99, and it works fine now. Yet another_patchesdirectory, so... yay. Maybe we should contribute these fixes upstream one day.